import { Component } from '@angular/core';
import { NavController, NavParams, ViewController } from 'ionic-angular';

/**
 * Generated class for the HomeListPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@Component({
  selector: 'page-home-list',
  templateUrl: 'home-list.html',
})
export class HomeListPage {

  constructor(public navCtrl: NavController,
              public viewCtrl: ViewController,
              public navParams: NavParams) {
  }

  devArr = [];

  ionViewDidLoad() {
    // console.log('ionViewDidLoad HomeListPage');
    // console.log('UserId', this.navParams.get('diaDeviceArr'));
    this.devArr = this.navParams.get('diaDeviceArr');
  }

  closeModal(){
    this.viewCtrl.dismiss('');
  }
  chooseItem(item) {
    this.viewCtrl.dismiss(item);
  }
  openMap(){
    window.location.href = 'baidumap://map/marker?location=40.047669,116.313082&title=我的位置&content=百度奎科大厦&src=webapp.marker.answ.zhny';
    // window.open('baidumap://map/marker?location=40.047669,116.313082&title=我的位置&content=百度奎科大厦&src=webapp.marker.answ.zhny')
  }

}
